<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>VBA 程序选择结构 | 一起学Excel</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="VBA 程序执行三大结构中，选择结构（判断）用于选择性地执行代码。选择结构与 Excel 的 IF 函数类似，也是以 IF 为关键词，按照判断条件的真假，执行不同的操作。但是 VBA 中的 IF比 Excel 中的 IF 函数更强大。 今天的文章，我们将学习 VBA 中选择结构的基本语法，并且结合实际的例子，介绍多种选择结构的形式。通过今天的学习，你将学会以下几种选择结构的语法和使用方式：  If">
<meta property="og:type" content="article">
<meta property="og:title" content="VBA 程序选择结构">
<meta property="og:url" content="https://lecoder.gitee.io/study-excel/vba-program-select-structure/index.html">
<meta property="og:site_name" content="一起学Excel">
<meta property="og:description" content="VBA 程序执行三大结构中，选择结构（判断）用于选择性地执行代码。选择结构与 Excel 的 IF 函数类似，也是以 IF 为关键词，按照判断条件的真假，执行不同的操作。但是 VBA 中的 IF比 Excel 中的 IF 函数更强大。 今天的文章，我们将学习 VBA 中选择结构的基本语法，并且结合实际的例子，介绍多种选择结构的形式。通过今天的学习，你将学会以下几种选择结构的语法和使用方式：  If">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_991a918a452013f4c5336c0677d591d6.png">
<meta property="og:image" content="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_884006130e89bb774e8fc3e2841bd4e0.png">
<meta property="og:image" content="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_57bbfcae5eeae4a37ca68d82b27608cf.png">
<meta property="og:image" content="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_7b501c614cfde6db15462c4928009487.png">
<meta property="og:image" content="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_73eb8fec7ea1c9b2f3dc8f39a3e449a5.png">
<meta property="og:image" content="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_21d521bbab0314d826d821eafe5d2c9d.png">
<meta property="og:image" content="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_a9b25389efb47260066971686e56a07c.png">
<meta property="article:published_time" content="2022-11-23T08:00:48.478Z">
<meta property="article:modified_time" content="2022-11-23T08:14:32.251Z">
<meta property="article:author" content="lijile">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_991a918a452013f4c5336c0677d591d6.png">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/study-excel/css/style.css">

<meta name="generator" content="Hexo 6.3.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/study-excel/" id="logo">一起学Excel</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/study-excel/">Home</a>
        
          <a class="main-nav-link" href="/study-excel/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://lecoder.gitee.io/study-excel"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-vba-program-select-structure" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/study-excel/vba-program-select-structure/" class="article-date">
  <time datetime="2022-11-23T08:00:48.478Z" itemprop="datePublished">2022-11-23</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/study-excel/categories/VBA/">VBA</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      VBA 程序选择结构
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>VBA 程序执行<a href="/study-excel/vba-program-structure/">三大结构中</a>，选择结构（判断）用于选择性地执行代码。选择结构与 Excel 的 <a href="/study-excel/excel-if-function/"><code>IF 函数</code></a>类似，也是以 <code>IF</code> 为关键词，按照判断条件的真假，执行不同的操作。但是 VBA 中的 <code>IF</code>比 Excel 中的 <code>IF 函数</code>更强大。</p>
<p>今天的文章，我们将学习 VBA 中选择结构的基本语法，并且结合实际的例子，介绍多种选择结构的形式。通过今天的学习，你将学会以下几种选择结构的语法和使用方式：</p>
<ul>
<li>If … Then 结构</li>
<li>If … Else 结构</li>
<li>If ElseIf Else 结构</li>
<li>Select Case 结构</li>
</ul>
<h2 id="选择结构基础"><a href="#选择结构基础" class="headerlink" title="选择结构基础"></a>选择结构基础</h2><p>选择结构，根据提供的条件表达式的值，如果为真（True），则执行选择结构的主体代码，否则跳过。</p>
<p>选择结构的核心是<strong>判断条件表达式的真假</strong>，这一步理解了，也就理解了选择结构的多种形式。</p>
<p>选择结构的基本执行方式如下：</p>
<p><img src="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_991a918a452013f4c5336c0677d591d6.png"></p>
<p> </p>
<h2 id="示例数据"><a href="#示例数据" class="headerlink" title="示例数据"></a>示例数据</h2><p>本篇我们使用一个班级的考试成绩作为示例数据。代码中如何与 Excel 中的数据交互，不需要看懂，这部分在 Excel 对象模型中详细介绍。</p>
<p><img src="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_884006130e89bb774e8fc3e2841bd4e0.png"></p>
<p> </p>
<h2 id="If-Then-结构"><a href="#If-Then-结构" class="headerlink" title="If Then 结构"></a>If Then 结构</h2><p>选择结构中，<code>If Then</code> 结构是最基础的一个。它只有条件表达式真时，执行的代码。</p>
<p><code>If Then</code>结构基本语法如下，其中 <code>End If</code>是选择结构的结束标志。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">If 条件表达式 Then</span><br><span class="line">    &#x27;表达式为真时，执行的代码</span><br><span class="line">End If</span><br></pre></td></tr></table></figure>

<p>现在我们看实际的例子，判断学生是否及格，及格条件是成绩 ≥60。如果及格，在C列对应单元格填写“及格”。具体代码如下：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">Sub MyCode()</span><br><span class="line"></span><br><span class="line">    Dim i As Integer</span><br><span class="line">    </span><br><span class="line">    For i = 2 To 10</span><br><span class="line">    </span><br><span class="line">        If Cells(i, &quot;B&quot;).Value &gt;= 60 Then</span><br><span class="line">            Cells(i, &quot;C&quot;) = &quot;及格&quot;</span><br><span class="line">        End If</span><br><span class="line">        </span><br><span class="line">    Next i</span><br><span class="line"></span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>我们可以看到，我们使用 B 列中的学生成绩与 60 分比较，如果≥60分，就在 C 列填写及格。</p>
<p>条件表达式是 <code>Cells(i, &quot;B&quot;).Value &gt;= 60</code>，选择性执行的代码部分是 <code>Cells(i, &quot;C&quot;) = &quot;及格&quot;</code>。</p>
<p>其中，For 语句是表示循环结构，这里只需知道程序从第一个学生循环到最后一个学生，依次判断每个学生的成绩。循环结构将在下一篇中做详细介绍。</p>
<p>将以上代码运行后，可以看到运行结果如下：</p>
<p><img src="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_57bbfcae5eeae4a37ca68d82b27608cf.png"></p>
<p> </p>
<h2 id="If-Else-结构"><a href="#If-Else-结构" class="headerlink" title="If Else 结构"></a>If Else 结构</h2><p>很多时候，我们根据表达式的真假，真时执行一块代码，假时执行另一块代码。这种需求可以使用 <code>If Else</code>结构实现。</p>
<p><code>If Else</code>结构中，条件表达式在真时，执行<code>Then</code>后的代码；条件表达式为假时，执行 <code>Else</code>后的代码。基本语法如下：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">If 条件表达式 Then</span><br><span class="line">    &#x27;真时执行的代码</span><br><span class="line">Else</span><br><span class="line">    &#x27;假时执行的代码</span><br><span class="line">End If</span><br></pre></td></tr></table></figure>

<p>我们继续看实际的例子。在上一个例子的基础上，这次对不及格的学生，在C列填入不及格。代码如下：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">Sub MyCode()</span><br><span class="line"></span><br><span class="line">    Dim i As Integer</span><br><span class="line">    </span><br><span class="line">    For i = 2 To 10</span><br><span class="line">    </span><br><span class="line">        If Cells(i, &quot;B&quot;).Value &gt;= 60 Then</span><br><span class="line">            Cells(i, &quot;C&quot;) = &quot;及格&quot;</span><br><span class="line">        Else</span><br><span class="line">            Cells(i, &quot;C&quot;) = &quot;不及格&quot;</span><br><span class="line">        End If</span><br><span class="line">        </span><br><span class="line">    Next i</span><br><span class="line"></span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>在这个例子中，条件表达式 <code>Cells(i, &quot;B&quot;).Value &gt;= 60</code>为假时，表示学生成绩低于60分，即不及格。这时就执行 <code>Else</code>后的代码。</p>
<p>程序运行结果如下：</p>
<p><img src="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_7b501c614cfde6db15462c4928009487.png"></p>
<p> </p>
<h2 id="If-ElseIf-Else-结构"><a href="#If-ElseIf-Else-结构" class="headerlink" title="If ElseIf Else 结构"></a>If ElseIf Else 结构</h2><p>前面两种结构中，最多有两种选择，即 ≥ 60 和 ＜ 60。有时针对同一个变量，可能存在多种判断标准。例如，对及格的学生，继续评级及格、良和优。</p>
<p><img src="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_73eb8fec7ea1c9b2f3dc8f39a3e449a5.png"></p>
<p>选择结构中，可以使用 <code>If ElseIf Else</code>结构，对同一个变量进行多次判断，并且为每一个判断结果编写不同的代码块，达到执行式 n 选 1 的效果。</p>
<p><code>If ElseIf Else</code>结构的基本语法如下：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">If 条件表达式1 Then</span><br><span class="line">    &#x27;表达式1真时，执行的代码</span><br><span class="line">ElseIf 条件表达式2 Then</span><br><span class="line">    &#x27;表达式2真时，执行的代码</span><br><span class="line">ElseIf 条件表达式3 Then</span><br><span class="line">    &#x27;表达式3真时，执行的代码</span><br><span class="line">    ...</span><br><span class="line">ElseIf 条件表达式n Then</span><br><span class="line">    &#x27;表达式n真时，执行的代码</span><br><span class="line">Else</span><br><span class="line">    &#x27;以上表达式都不为真时，执行的代码</span><br><span class="line">End If</span><br></pre></td></tr></table></figure>

<p>这种选择结构需要注意的是：</p>
<ul>
<li>条件表达式是从第一个开始判断。</li>
<li>判断过程中，只要有一个表达式结果为真，那么执行对应的代码块，然后退出选择结构，不再继续判断剩下的表达式。</li>
<li>当所有的表达式都不为真时，执行 <code>Else</code>后的代码块。</li>
</ul>
<p>根据以上规律，我们写一下判断学生成绩评级的代码。思路是，拿学生成绩，分别于85、75、60分比较，在 D 列填写对应的评级。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">Sub MyCode()</span><br><span class="line"></span><br><span class="line">    Dim i As Integer</span><br><span class="line">    </span><br><span class="line">    For i = 2 To 10</span><br><span class="line">    </span><br><span class="line">        If Cells(i, &quot;B&quot;).Value &gt;= 85 Then</span><br><span class="line">            Cells(i, &quot;D&quot;) = &quot;优&quot;</span><br><span class="line">        ElseIf Cells(i, &quot;B&quot;).Value &gt;= 75 Then</span><br><span class="line">            Cells(i, &quot;D&quot;) = &quot;良&quot;</span><br><span class="line">        ElseIf Cells(i, &quot;B&quot;).Value &gt;= 60 Then</span><br><span class="line">            Cells(i, &quot;D&quot;) = &quot;及格&quot;</span><br><span class="line">        Else</span><br><span class="line">            Cells(i, &quot;D&quot;) = &quot;不及格&quot;</span><br><span class="line">        End If</span><br><span class="line">        </span><br><span class="line">    Next i</span><br><span class="line"></span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>代码运行结果如下：</p>
<p><img src="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_21d521bbab0314d826d821eafe5d2c9d.png"></p>
<p> </p>
<h2 id="Select-Case-结构"><a href="#Select-Case-结构" class="headerlink" title="Select Case 结构"></a>Select Case 结构</h2><p><code>Select Case</code>结构是对同一个变量进行多次判断的另一种方式。相对于<code>If ElseIf Else</code>结构，它把条件表达式中的变量提取出来，使得代码结构更简洁，也更易于阅读。</p>
<p><code>Select Case</code>结构的基本语法如下：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">Select Case 变量</span><br><span class="line">	Case 判断条件 1</span><br><span class="line">    	&#x27;条件 1 真时，执行的代码</span><br><span class="line">	Case 判断条件 2</span><br><span class="line">    	&#x27;条件 2 真时，执行的代码</span><br><span class="line">	Case 判断条件 3</span><br><span class="line">    	&#x27;条件 3 真时，执行的代码</span><br><span class="line">    Case Else</span><br><span class="line">    	&#x27;之前的所有条件都不为真时，执行的代码</span><br><span class="line">End Select</span><br></pre></td></tr></table></figure>

<p>可以看到，<code>Select Case</code>结构把 <code>If</code>结构中的条件表达式拆分了，即把变量和判断条件分开了。</p>
<p>我们看前一个例子，使用<code>Select Case</code>结构，代码如下：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">Sub MyCode()</span><br><span class="line"></span><br><span class="line">    Dim i As Integer</span><br><span class="line">    </span><br><span class="line">    For i = 2 To 10</span><br><span class="line">    </span><br><span class="line">        Select Case Cells(i, &quot;B&quot;).Value</span><br><span class="line">            Case Is &gt;= 85</span><br><span class="line">                Cells(i, &quot;D&quot;) = &quot;优&quot;</span><br><span class="line">            Case Is &gt;= 75</span><br><span class="line">                Cells(i, &quot;D&quot;) = &quot;良&quot;</span><br><span class="line">            Case Is &gt;= 60</span><br><span class="line">                Cells(i, &quot;D&quot;) = &quot;及格&quot;</span><br><span class="line">            Case Else</span><br><span class="line">                Cells(i, &quot;D&quot;) = &quot;不及格&quot;</span><br><span class="line">        End Select</span><br><span class="line">        </span><br><span class="line">    Next i</span><br><span class="line"></span><br><span class="line">End Sub</span><br></pre></td></tr></table></figure>

<p>这一例子中，学生成绩是变量，即 <code>Cells(i, &quot;B&quot;).Value</code>，判断条件是每个 <code>Case</code> 语句后的条件。</p>
<p>代码运行结构如下：</p>
<p><img src="https://university-oss-2022.oss-cn-guangzhou.aliyuncs.com/easyexcel/uploads/im_a9b25389efb47260066971686e56a07c.png"></p>
<p> </p>
<h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>以上就是选择结构的基本用法，以及 4 种选择结构。选择结构的核心是判断条件表达式的真假，从另一个角度看，核心是如何写条件表达式。这一步写好了，下一步就是根据判断结果执行不同的代码块。</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://lecoder.gitee.io/study-excel/vba-program-select-structure/" data-id="clatcwb86004mxcq62u7r1pil" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/study-excel/vba-goto-structure/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          VBA GoTo 结构
        
      </div>
    </a>
  
  
    <a href="/study-excel/vba-program-loop-structure/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">VBA 程序循环结构</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/VBA/">VBA</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%85%AC%E5%BC%8F/">公式</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%87%BD%E6%95%B0/">函数</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">函数与公式基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80/%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">公式基础</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80/%E5%85%AC%E5%BC%8F%E9%94%99%E8%AF%AF/">公式错误</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8A%9F%E8%83%BD/">功能</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8A%9F%E8%83%BD%E5%8C%BA/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8A%9F%E8%83%BD%E5%8C%BA/%E5%9F%BA%E7%A1%80/%E5%85%AC%E5%BC%8F/">公式</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8D%95%E5%85%83%E6%A0%BC%E5%BC%95%E7%94%A8/">单元格引用</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8D%95%E5%85%83%E6%A0%BC%E5%BC%95%E7%94%A8/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%8D%95%E5%85%83%E6%A0%BC%E5%BC%95%E7%94%A8/%E5%9F%BA%E7%A1%80/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">函数与公式基础</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/">基本概念</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/%E5%9F%BA%E7%A1%80/%E4%BD%BF%E7%94%A8-Excel/">使用 Excel</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/%E5%9F%BA%E7%A1%80/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F/">函数与公式</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/%E5%9F%BA%E7%A1%80/%E5%8D%95%E5%85%83%E6%A0%BC/">单元格</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/">基本设置</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E7%A1%80/%E4%BF%9D%E5%AD%98%E8%AE%BE%E7%BD%AE/">保存设置</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E7%A1%80/%E5%85%AC%E5%BC%8F%E8%AE%BE%E7%BD%AE/">公式设置</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E7%A1%80/%E5%85%B6%E4%BB%96%E8%AE%BE%E7%BD%AE/">其他设置</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/">基础</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/">基础操作</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E4%BF%9D%E6%8A%A4/">保护</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%A4%8D%E5%88%B6%E5%85%AC%E5%BC%8F/">复制公式</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%A4%8D%E5%88%B6%E5%85%AC%E5%BC%8F/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">函数与公式基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%AE%A1%E9%98%85/">审阅</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%AE%A1%E9%98%85/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B7%A5%E4%BD%9C%E7%95%8C%E9%9D%A2/">工作界面</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B7%A5%E4%BD%9C%E7%95%8C%E9%9D%A2/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/">基本概念</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B8%B8%E8%A7%81%E6%9C%AF%E8%AF%AD/">常见术语</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B8%B8%E8%A7%81%E6%9C%AF%E8%AF%AD/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/">基本概念</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B8%B8%E8%A7%84%E8%AE%BE%E7%BD%AE/">常规设置</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%B8%B8%E8%A7%84%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/">基本设置</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%BC%80%E5%A7%8B/">开始</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E5%BC%80%E5%A7%8B/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%8F%92%E5%85%A5/">插入</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%8F%92%E5%85%A5/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%95%B0%E6%8D%AE/">数据</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%95%B0%E6%8D%AE/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD%E5%92%8C%E5%87%BD%E6%95%B0/">新增功能和函数</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD%E5%92%8C%E5%87%BD%E6%95%B0/Excel-2007/">Excel 2007</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD%E5%92%8C%E5%87%BD%E6%95%B0/Excel-2010/">Excel 2010</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD%E5%92%8C%E5%87%BD%E6%95%B0/Excel-2013/">Excel 2013</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%96%B0%E5%A2%9E%E5%8A%9F%E8%83%BD%E5%92%8C%E5%87%BD%E6%95%B0/Excel-2016/">Excel 2016</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%A0%A1%E5%AF%B9%E8%AE%BE%E7%BD%AE/">校对设置</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E6%A0%A1%E5%AF%B9%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/">基本设置</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E7%BC%96%E5%86%99%E5%85%AC%E5%BC%8F/">编写公式</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E7%BC%96%E5%86%99%E5%85%AC%E5%BC%8F/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">函数与公式基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E7%BC%96%E8%BE%91%E5%85%AC%E5%BC%8F/">编辑公式</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E7%BC%96%E8%BE%91%E5%85%AC%E5%BC%8F/%E5%87%BD%E6%95%B0%E4%B8%8E%E5%85%AC%E5%BC%8F%E5%9F%BA%E7%A1%80/">函数与公式基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E8%A7%86%E5%9B%BE/">视图</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E8%A7%86%E5%9B%BE/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%A1%B5%E9%9D%A2%E5%B8%83%E5%B1%80/">页面布局</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%A1%B5%E9%9D%A2%E5%B8%83%E5%B1%80/%E5%8A%9F%E8%83%BD%E5%8C%BA/">功能区</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%AB%98%E7%BA%A7%E8%AE%BE%E7%BD%AE/">高级设置</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%AB%98%E7%BA%A7%E8%AE%BE%E7%BD%AE/%E5%9F%BA%E6%9C%AC%E8%AE%BE%E7%BD%AE/">基本设置</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%BC%A0%E6%A0%87%E6%8C%87%E9%92%88/">鼠标指针</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80/%E9%BC%A0%E6%A0%87%E6%8C%87%E9%92%88/%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/">基本概念</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/">基础操作</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E5%A4%8D%E5%88%B6%E4%B8%8E%E7%B2%98%E8%B4%B4/">复制与粘贴</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E5%A4%8D%E5%88%B6%E4%B8%8E%E7%B2%98%E8%B4%B4/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E6%89%93%E5%8D%B0/">打印</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E6%89%93%E5%8D%B0/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E6%9F%A5%E6%89%BE%E4%B8%8E%E9%80%89%E6%8B%A9/">查找与选择</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E6%9F%A5%E6%89%BE%E4%B8%8E%E9%80%89%E6%8B%A9/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%8D%95%E5%85%83%E6%A0%BC%E6%A0%BC%E5%BC%8F/">编辑单元格格式</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%8D%95%E5%85%83%E6%A0%BC%E6%A0%BC%E5%BC%8F/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%B7%A5%E4%BD%9C%E8%A1%A8/">编辑工作表</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%B7%A5%E4%BD%9C%E8%A1%A8/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%B7%A5%E4%BD%9C%E8%A1%A8%E5%8C%BA%E5%9F%9F/">编辑工作表区域</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E5%B7%A5%E4%BD%9C%E8%A1%A8%E5%8C%BA%E5%9F%9F/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E6%95%B0%E5%AD%97%E6%A0%BC%E5%BC%8F/">编辑数字格式</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E7%BC%96%E8%BE%91%E6%95%B0%E5%AD%97%E6%A0%BC%E5%BC%8F/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E9%BC%A0%E6%A0%87%E6%93%8D%E4%BD%9C/">鼠标操作</a><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C/%E9%BC%A0%E6%A0%87%E6%93%8D%E4%BD%9C/%E5%9F%BA%E7%A1%80/">基础</a></li></ul></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E5%BF%AB%E6%8D%B7%E9%94%AE/">快捷键</a></li><li class="category-list-item"><a class="category-list-link" href="/study-excel/categories/%E9%97%AE%E9%A2%98/">问题</a></li></ul>
    </div>
  </div>


  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/study-excel/archives/2022/11/">十一月 2022</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/study-excel/excel-coupdaybs-function/">Excel COUPDAYBS 函数</a>
          </li>
        
          <li>
            <a href="/study-excel/excel-coupdays-function/">Excel COUPDAYS 函数</a>
          </li>
        
          <li>
            <a href="/study-excel/excel-coupdaysnc-function/">Excel COUPDAYSNC 函数</a>
          </li>
        
          <li>
            <a href="/study-excel/excel-coupncd-function/">Excel COUPNCD 函数</a>
          </li>
        
          <li>
            <a href="/study-excel/excel-coupnum-function/">Excel COUPNUM 函数</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2022 lijile<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/study-excel/" class="mobile-nav-link">Home</a>
  
    <a href="/study-excel/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/study-excel/fancybox/jquery.fancybox.css">

  
<script src="/study-excel/fancybox/jquery.fancybox.pack.js"></script>




<script src="/study-excel/js/script.js"></script>




  </div>
</body>
</html>